package com.xncoding.design.ZeRenLian.demo4;

public class BeforeFilter implements Filter {
    @Override
    public void process(FilterChain chain, Method method) {
        // 1.do something before
        beforeProcess();

        // 2.
        chain.process();
    }

    private void beforeProcess() {
        System.out.println("do something before");
    }
}
